package no.ntnu.tdt4237;

public class Validation {

	
	
	public Validation() {
		
	}
	
	public static boolean validated(BlogPost post) {
		String title = post.getTitle();
		String text = post.getText();
		if (title.matches(".*<.*") || title.matches(".*>.*") || title.matches(".*%.*") || text.matches(".*<.*") || text.matches(".*>.*") || text.matches(".*%.*")) {
			return false;
		} else {
			return true;
		}
	}
}
